home *** CD-ROM | disk | FTP | other *** search
- #include "stdafx.h"
-
- cMine::cMine(int _x, int _y, cGameObject *_owner)
- : cWeapon(_x, _y, mine, "MOVING")
- {
- explode_wait = MINE_DELAY;
-
- push_moving_direction = FALSE;
-
- move_object_after_hit = FALSE;
-
- owner = _owner;
- }
-
- cMine::~cMine()
- {
- }
-
- int cMine::control()
- {
- cWeapon::control();
-
- bounce_on_boundaries();
-
- // Check if we're to explode
-
- if (!explode_wait || explode)
- {
- check_radial_hit_more(&cCircle(0, 0, MINE_RADIUS));
-
- return FALSE;
- }
-
- // Delete when off screen
-
- return !in_water();
- }
-